Inject Variables

Variables are used to store static or dynamic values that can then be passed to a range of processes in both the Data Flow and the Master Flow. Variables can be injected into filters, calculated columns, and SQL, Python, and R scripts.

Note: this feature is available only with an Enterprise edition license.

  • Click here to learn more about Variables.

Variable Injection into Filter Nodes

To inject the variable into a filter node, change the Filter Value from 'Static' to 'Variable' (green arrow below) and select the required variable from the next drop-down (blue arrow). The given Filter Column will now be filtered by the specified variable, which may be static or dynamic (based on an expression), rather than a static numeric value.

You can set incremental loading for the table from the Set Variable Values window (yellow highlight).

Variable Injection into Calculated Columns

To inject the variable into the calculated column, either:

  • Write your script in the Calculated Column script window. Insert the variable into your script, with the syntax @variablename. For example, @ProductKeyVariable.
  • Write your script in the PQL Editor. Click Variables in the Columns panel, and select the required variable from the Elements panel to add it to the script.

Variable Injection into Scripts

You can inject a variable into scripts when working with the following nodes:

To inject the variable into the script, add @ and the variable name. For example:

SELECT * FROM [products p] where [p.ProductKey] > @MaxProductKey